/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.gui;

/**
 *
 * @author Teao
 */
public class AlunoPrincipal extends javax.swing.JFrame {

    static final int ALTURA  = 340;
    static final int LARGURA = 640;
    
    /**
     * Creates new form AdmPrincipal
     */
    public AlunoPrincipal() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        PAluno = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        BSair = new javax.swing.JButton();
        BLogoff = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu4 = new javax.swing.JMenu();
        MTurmaConsultar = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        MDiscConsultar = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        MConsultarAluno = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(null);

        PAluno.setLayout(null);

        jLabel3.setText("Seja bem vindo. Selecione uma das opções a seguir:");
        jLabel3.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        PAluno.add(jLabel3);
        jLabel3.setBounds(20, 20, 560, 250);

        getContentPane().add(PAluno);
        PAluno.setBounds(20, 20, 770, 480);

        BSair.setText("Sair");
        BSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BSairActionPerformed(evt);
            }
        });
        getContentPane().add(BSair);
        BSair.setBounds(580, 520, 210, 60);

        BLogoff.setText("Logoff...");
        BLogoff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BLogoffActionPerformed(evt);
            }
        });
        getContentPane().add(BLogoff);
        BLogoff.setBounds(40, 520, 210, 60);

        jMenu4.setText("Turma");

        MTurmaConsultar.setText("Consultar");
        MTurmaConsultar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MTurmaConsultarActionPerformed(evt);
            }
        });
        jMenu4.add(MTurmaConsultar);

        jMenuBar1.add(jMenu4);

        jMenu6.setText("Disciplina");

        MDiscConsultar.setText("Consultar");
        MDiscConsultar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MDiscConsultarActionPerformed(evt);
            }
        });
        jMenu6.add(MDiscConsultar);

        jMenuBar1.add(jMenu6);

        jMenu1.setText("Consulta");

        MConsultarAluno.setText("Aluno");
        MConsultarAluno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MConsultarAlunoActionPerformed(evt);
            }
        });
        jMenu1.add(MConsultarAluno);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-849)/2, (screenSize.height-662)/2, 849, 662);
    }// </editor-fold>//GEN-END:initComponents

    private void BSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BSairActionPerformed
        System.exit(0);
    }//GEN-LAST:event_BSairActionPerformed

    private void MDiscConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MDiscConsultarActionPerformed
        // Consulta a situação do aluno em uma disciplina. Interação com 
        // o painel GuiAlunoConsultarDisc
        
        GuiDiscConsultar panel = new GuiDiscConsultar();
        PAluno.removeAll();
        PAluno.add(panel);
        PAluno.repaint();
        panel.setLocation(0,0);
        panel.setSize(LARGURA, ALTURA);
        
    }//GEN-LAST:event_MDiscConsultarActionPerformed

    private void BLogoffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BLogoffActionPerformed
        
        this.setVisible(false);
        TelaLogin janela = new TelaLogin();
        janela.setVisible(true);
    }//GEN-LAST:event_BLogoffActionPerformed

    private void MTurmaConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MTurmaConsultarActionPerformed
        // TODO add your handling code here:
        
        GuiTurmaConsultar panel = new GuiTurmaConsultar();
        PAluno.removeAll();
        PAluno.add(panel);
        PAluno.repaint();
        panel.setLocation(0,0);
        panel.setSize(LARGURA, ALTURA);
    }//GEN-LAST:event_MTurmaConsultarActionPerformed

    private void MConsultarAlunoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MConsultarAlunoActionPerformed
        // TODO add your handling code here:
        GuiAlunoConsultar panel = new GuiAlunoConsultar();
        PAluno.removeAll();
        PAluno.add(panel);
        PAluno.repaint();
        panel.setLocation(0,0);
        panel.setSize(LARGURA, ALTURA);
    }//GEN-LAST:event_MConsultarAlunoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(AlunoPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(AlunoPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(AlunoPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(AlunoPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new AlunoPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BLogoff;
    private javax.swing.JButton BSair;
    private javax.swing.JMenuItem MConsultarAluno;
    private javax.swing.JMenuItem MDiscConsultar;
    private javax.swing.JMenuItem MTurmaConsultar;
    private javax.swing.JPanel PAluno;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenuBar jMenuBar1;
    // End of variables declaration//GEN-END:variables
}
